package com.molichuxing.services.infrastructure.dto.response;

import com.molichuxing.services.property.OrderExclusivelStatusEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 逾期还款信息bean
 *
 * @author zoumingyu
 * @date 2019年8月14日
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class OrderScheduleOverdueDto extends OrderScheduleDto {
    private static final long serialVersionUID = 5463121237233286318L;

    /**
     * 已还金额
     */
    private BigDecimal hasPayAmount;

    /**
     * 总金额
     */
    private BigDecimal totalAmount;

    /**
     * 逾期天数
     */
    private Integer overdueDays;

    /**
     * 逾期未还次数
     */
    private Integer overdueNoPayPeriods;

    /**
     * 逾期次数（包括逾期已还）
     */
    private Integer overduePeriods;

    /**
     * 订单状态
     */
    private OrderExclusivelStatusEnum orderStatus;

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus == null ? null : OrderExclusivelStatusEnum.getEnum(orderStatus);
    }
}
